*** MASTER FILE FOR INDIRECT SURVEY PAPER
*** THIS FILE CALLS DO FILES FOR DIFFERENT SECTIONS OF THE PAPER

	set more off
	
*	Select user first to be able to run the do file

	local 	sel_user		2		// 1 - Thamanna, 2 - Jen
	
	if 		`sel_user' 		== 1 { 
		global 	user		"Z:\Research\Indirect Survey\"
	}	
	
	if 		`sel_user' 		== 2 {
		global user 		"C:\Users\alixgarj\Dropbox\Indirect survey\"
	}
	

	
	global	data			"${user}Data\"
	global 	outputs			"${user}Outputs\"
	global 	dofiles			"${user}Do files\"

***** THIS SECTION TELLS STATA WHICH DO FILES TO RUN: 0 MEANS DON'T RUN AND 1 MEANS RUN	
	
	
	local tab_sum_stats						1
	local tab_universe						0
	local regressions						0
	local reporting_heterogeneity			0
	local poverty							0
	local pov_robustness					0
	local estimation						0
	local ejido_level						0
	local rank								0
	local missing							0
	local measurement						1
	local abbr								0

****************** BASIC SUMMARY STATISTICS ******************
if `tab_sum_stats' {	
	include	"${dofiles}table1R1replication.do"
}

******************* COMPARING SAMPLE TO UNIVERSE (PHINA DATA FILE NOT INCLUDED IN REPLICATION FILES)

if `tab_universe' {	
	include	"${dofiles}sum_universereplication.do"
}

******************* LOOKING AT CORRELATIONS BETWEEN LEADER AND HOUSEHOLD REPORTS

if `regressions' {	
	include	"${dofiles}regressionsreplication.do"
}

******************* DO REPORTS VARY BY RESPONDENT CHARACTERISTICS? ********************
if `reporting_heterogeneity' {
	include "${dofiles}reporting_heterogeneityreplication.do"
	}
	
*********************** TARGETING EXPERIMENT USING POVERTY INDICES ***********************	
if `poverty' {	
	include	"${dofiles}pov_index_is_replication.do"
}

********************** ROBUSTNESS CHECKS ON POVERTY INDICES *****************************

if `pov_robustness' {	
	include	"${dofiles}pov_robustnessreplication.do"
}

************ CONSIDERING THE QUESTION OF WHETHER WE CAN USE THE INDICES IN REGRESSIONS **************************

if `estimation' {	
	include	"${dofiles}estimationreplication.do"
}

*********** COLLAPSING INDICES TO EJIDO LEVEL **********************************

if `ejido_level' {	
	include	"${dofiles}pov_index_ejidoreplication.do"
}

*************** HOW DO THE INDICES DO IN RANKING PEOPLE RATHER THAN JUST CLASSIFYING POOR/NON-POOR ********************
if `rank' {	
	include	"${dofiles}rankreplication.do"
}

*************** TRYING TO UNDERSTAND MISSING DATA PROBLEMS **********************************

if `missing' {	
	include	"${dofiles}missingsreplication.do"
}

**************** CHECKING TO SEE IF ERROR VARIES BETWEEN 1, 2, AND 3 HOUSES ASKED ABOUT ********************

if `measurement' {	
	include	"${dofiles}ME_IndirectSurveyreplication.do"
}

*************** TESTING A POVERTY INDEX WITH THE THREE LEAST NOISY COMPONENTS ****************

if `abbr' {	
	include	"${dofiles}pov_index_small_replication.do"
}